package com.isunland.managesystem.utils;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import com.isunland.managesystem.ui.MessageDialog;

/**
 * Created by wangyanan on 2016/6/24.
 * dialog工具类
 */
public class DialogUtil {

  public static void showMessage(Fragment fragment, int resId) {
    String message = fragment.getActivity().getString(resId);
    MessageDialog mdialog = MessageDialog.newInstence(message);

    FragmentManager fm = fragment.getActivity().getSupportFragmentManager();
    mdialog.setTargetFragment(fragment, 0);
    mdialog.show(fm, "");
  }
}
